package ebcs.database.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ebcs.database.bean.BsProTeamInfor;
import ebcs.database.bean.BsProTeamInforExample;
import ebcs.database.bean.BsProTeamInforExample.Criteria;
import ebcs.database.mybatis.dao.BsProTeamInforMapper;
import ebcs.database.service.BsProTeamServiceImp;

@Service
public class BsProTeamServiceImpl implements BsProTeamServiceImp
{
	@Autowired
	private BsProTeamInforMapper dao;

	@Override
	public List<BsProTeamInfor> searchProTeanList() {
		BsProTeamInforExample example = new  BsProTeamInforExample();
 		return this.dao.selectByExample(example);
	}

	@Override
	public List<BsProTeamInfor> searchProTeanListByGroupNo(String groupNo) {
		BsProTeamInforExample example = new  BsProTeamInforExample();
		Criteria criteria = example.createCriteria();
		criteria.andProGroupNoEqualTo(groupNo);
 		return this.dao.selectByExample(example);
	}

	@Override
	public List<BsProTeamInfor> selectProTeamDetail(BsProTeamInfor proTeam) {
		// TODO Auto-generated method stub
		return this.dao.selectProTeamDetail(proTeam);
	}
	
	@Override
	public List<BsProTeamInfor> selectProTeamDetailPage(BsProTeamInfor proTeam) {
		// TODO Auto-generated method stub
		return this.dao.selectProTeamDetailPage(proTeam);
	}
	
	@Override
	public int selectProTeamDetailCount(BsProTeamInfor proTeam) {
		// TODO Auto-generated method stub
		return this.dao.selectProTeamDetailCount(proTeam);
	}

	@Override
	public List<BsProTeamInfor> selectProTeamInforsByProTeamName(String proTeamName) {
		// TODO Auto-generated method stub
		return this.dao.selectProTeamInforsByProTeamName(proTeamName);
	}

	
	
	@Override
	public int deleteProTeamByProTeamNo(String proTeamNo) {
		// TODO Auto-generated method stub
		return this.dao.deleteProTeamByProTeamNo(proTeamNo);
	}

	@Override
	public int updateProTeamByTeamNo(BsProTeamInfor proTeam) {
		// TODO Auto-generated method stub
		return this.dao.updateProTeamByTeamNo(proTeam);
	}

	@Override
	public BsProTeamInfor selectProTeamMaxNoByGroupNo(String groupNo) {
		// TODO Auto-generated method stub
		return this.dao.selectProTeamMaxNoByGroupNo(groupNo);
	}

	@Override
	public int insertProTeamInfor(BsProTeamInfor proTeam) {
		// TODO Auto-generated method stub
		return this.dao.insert(proTeam);
	}

	@Override
	public List<BsProTeamInfor> selectProTeamByGroupNo(String groupNo) {
		// TODO Auto-generated method stub
		return this.dao.selectProTeamByGroupNo(groupNo);
	}

	@Override
	public List<BsProTeamInfor> searchProTeanListByProTeamNo(String proTeamNo) {
		// TODO Auto-generated method stub
		return this.dao.searchProTeanListByProTeamNo(proTeamNo);
	}
	
	public List<BsProTeamInfor> searchProTeanList2(String proGroupNo ) {
 		return this.dao.selectByExample2(proGroupNo);
	}
}
